<?php

class Admin_Model_User extends Libs_Model {
     private $tbl = 'tbl_user';
    public function __construct() {
        parent::__construct();
    }

    public function checkLogin($_email, $_pass) {
        $sql = "SELECT * FROM tbl_user WHERE user_email= '$_email' AND user_pass = '$_pass'";
        $result = mysql_query($sql);
        $row = mysql_num_rows($result);
        if ($row > 0) {
            return true;
        } else {
            return false;
        }
    }

    public function getUser($_email, $_pass) {
        $sql = "SELECT * FROM tbl_user WHERE user_email= '$_email' AND user_pass = '$_pass'";
        return $this->db->fetchAll($sql);
    }
    public function updateUser($data,$id=''){
        $this->db->prepareUpdate($data);
        $this->db-> update($this->tbl,$id);
    }
}

?>
